3.146 \(\int \frac{(c+d \tan (e+f x))^{5/2} (A+B \tan (e+f x)+C \tan ^2(e+f x))}{(a+b \tan (e+f x))^{9/2}} \, dx\)

Optimal. Leaf size=946 \[ -\frac{(i A+B-i C) \tanh ^{-1}\left (\frac{\sqrt{c-i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a-i b} \sqrt{c+d \tan (e+f x)}}\right ) (c-i d)^{5/2}}{(a-i b)^{9/2} f}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}-\frac{2 \left (5 C d a^4+2 b B d a^3-b^2 (7 B c+9 A d-19 C d) a^2+2 b^3 (7 A c-7 C c-6 B d) a+b^4 (7 B c+5 A d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{(B-i (A-C)) (c+i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a+i b} \sqrt{c+d \tan (e+f x)}}\right )}{(a+i b)^{9/2} f}-\frac{2 \left (15 C d^3 a^8+6 b B d^3 a^7+2 b^2 d^2 (7 B c+4 A d+26 C d) a^6+2 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right ) a^5-b^4 \left (105 B c^3+525 A d c^2-525 C d c^2-749 B d^2 c-311 A d^3+221 C d^3\right ) a^4-2 b^5 \left (210 C c^3+700 B d c^2-798 C d^2 c-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right ) a^3+2 b^6 \left (315 B c^3+875 A d c^2-875 C d c^2-812 B d^2 c-261 A d^3+291 C d^3\right ) a^2-2 b^7 \left (210 A c^3-210 C c^3-525 B d c^2-406 A d^2 c+406 C d^2 c+88 B d^3\right ) a-b^8 \left (5 d \left (49 A c^2-49 C c^2-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (15 C d^2 a^6+6 b B d^2 a^5+b^2 d (14 B c+8 A d+37 C d) a^4-b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right ) a^3+3 b^4 \left (35 A c^2-35 C c^2-70 B d c-39 A d^2+54 C d^2\right ) a^2+b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right ) a+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}} \]

[Out]

-(((I*A + B - I*C)*(c - I*d)^(5/2)*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a - I*b]*Sqrt[c + d*
Tan[e + f*x]])])/((a - I*b)^(9/2)*f)) - ((B - I*(A - C))*(c + I*d)^(5/2)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan
[e + f*x]])/(Sqrt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/((a + I*b)^(9/2)*f) - (2*(6*a^5*b*B*d^2 + 15*a^6*C*d^2
+ a^4*b^2*d*(14*B*c + 8*A*d + 37*C*d) + 3*a^2*b^4*(35*A*c^2 - 35*c^2*C - 70*B*c*d - 39*A*d^2 + 54*C*d^2) - a^3
*b^3*(98*c*(A - C)*d + B*(35*c^2 - 75*d^2)) + a*b^5*(182*c*(A - C)*d + B*(105*c^2 - 71*d^2)) + b^6*(7*c*(5*c*C
 + 8*B*d) - 5*A*(7*c^2 - 3*d^2)))*Sqrt[c + d*Tan[e + f*x]])/(105*b^3*(a^2 + b^2)^3*f*(a + b*Tan[e + f*x])^(3/2
)) - (2*(6*a^7*b*B*d^3 + 15*a^8*C*d^3 + 2*a^6*b^2*d^2*(7*B*c + 4*A*d + 26*C*d) - 2*a*b^7*(210*A*c^3 - 210*c^3*
C - 525*B*c^2*d - 406*A*c*d^2 + 406*c*C*d^2 + 88*B*d^3) - a^4*b^4*(105*B*c^3 + 525*A*c^2*d - 525*c^2*C*d - 749
*B*c*d^2 - 311*A*d^3 + 221*C*d^3) + 2*a^2*b^6*(315*B*c^3 + 875*A*c^2*d - 875*c^2*C*d - 812*B*c*d^2 - 261*A*d^3
 + 291*C*d^3) + 2*a^5*b^3*d*(56*c*(A - C)*d + B*(35*c^2 - 12*d^2)) - b^8*(5*d*(49*A*c^2 - 49*c^2*C - 3*A*d^2)
+ 7*B*(15*c^3 - 23*c*d^2)) - 2*a^3*b^5*(210*c^3*C + 700*B*c^2*d - 798*c*C*d^2 - 317*B*d^3 - 42*A*(5*c^3 - 19*c
*d^2)))*Sqrt[c + d*Tan[e + f*x]])/(105*b^3*(a^2 + b^2)^4*(b*c - a*d)*f*Sqrt[a + b*Tan[e + f*x]]) - (2*(2*a^3*b
*B*d + 5*a^4*C*d + b^4*(7*B*c + 5*A*d) + 2*a*b^3*(7*A*c - 7*c*C - 6*B*d) - a^2*b^2*(7*B*c + 9*A*d - 19*C*d))*(
c + d*Tan[e + f*x])^(3/2))/(35*b^2*(a^2 + b^2)^2*f*(a + b*Tan[e + f*x])^(5/2)) - (2*(A*b^2 - a*(b*B - a*C))*(c
 + d*Tan[e + f*x])^(5/2))/(7*b*(a^2 + b^2)*f*(a + b*Tan[e + f*x])^(7/2))

________________________________________________________________________________________

Rubi [A]  time = 6.46419, antiderivative size = 946, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 6, integrand size = 49, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.122, Rules used = {3645, 3649, 3616, 3615, 93, 208} \[ -\frac{(i A+B-i C) \tanh ^{-1}\left (\frac{\sqrt{c-i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a-i b} \sqrt{c+d \tan (e+f x)}}\right ) (c-i d)^{5/2}}{(a-i b)^{9/2} f}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}-\frac{2 \left (5 C d a^4+2 b B d a^3-b^2 (7 B c+9 A d-19 C d) a^2+2 b^3 (7 A c-7 C c-6 B d) a+b^4 (7 B c+5 A d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{(B-i (A-C)) (c+i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a+i b} \sqrt{c+d \tan (e+f x)}}\right )}{(a+i b)^{9/2} f}-\frac{2 \left (15 C d^3 a^8+6 b B d^3 a^7+2 b^2 d^2 (7 B c+4 A d+26 C d) a^6+2 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right ) a^5-b^4 \left (105 B c^3+525 A d c^2-525 C d c^2-749 B d^2 c-311 A d^3+221 C d^3\right ) a^4-2 b^5 \left (210 C c^3+700 B d c^2-798 C d^2 c-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right ) a^3+2 b^6 \left (315 B c^3+875 A d c^2-875 C d c^2-812 B d^2 c-261 A d^3+291 C d^3\right ) a^2-2 b^7 \left (210 A c^3-210 C c^3-525 B d c^2-406 A d^2 c+406 C d^2 c+88 B d^3\right ) a-b^8 \left (5 d \left (49 A c^2-49 C c^2-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (15 C d^2 a^6+6 b B d^2 a^5+b^2 d (14 B c+8 A d+37 C d) a^4-b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right ) a^3+3 b^4 \left (35 A c^2-35 C c^2-70 B d c-39 A d^2+54 C d^2\right ) a^2+b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right ) a+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[((c + d*Tan[e + f*x])^(5/2)*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(a + b*Tan[e + f*x])^(9/2),x]

[Out]

-(((I*A + B - I*C)*(c - I*d)^(5/2)*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a - I*b]*Sqrt[c + d*
Tan[e + f*x]])])/((a - I*b)^(9/2)*f)) - ((B - I*(A - C))*(c + I*d)^(5/2)*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan
[e + f*x]])/(Sqrt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/((a + I*b)^(9/2)*f) - (2*(6*a^5*b*B*d^2 + 15*a^6*C*d^2
+ a^4*b^2*d*(14*B*c + 8*A*d + 37*C*d) + 3*a^2*b^4*(35*A*c^2 - 35*c^2*C - 70*B*c*d - 39*A*d^2 + 54*C*d^2) - a^3
*b^3*(98*c*(A - C)*d + B*(35*c^2 - 75*d^2)) + a*b^5*(182*c*(A - C)*d + B*(105*c^2 - 71*d^2)) + b^6*(7*c*(5*c*C
 + 8*B*d) - 5*A*(7*c^2 - 3*d^2)))*Sqrt[c + d*Tan[e + f*x]])/(105*b^3*(a^2 + b^2)^3*f*(a + b*Tan[e + f*x])^(3/2
)) - (2*(6*a^7*b*B*d^3 + 15*a^8*C*d^3 + 2*a^6*b^2*d^2*(7*B*c + 4*A*d + 26*C*d) - 2*a*b^7*(210*A*c^3 - 210*c^3*
C - 525*B*c^2*d - 406*A*c*d^2 + 406*c*C*d^2 + 88*B*d^3) - a^4*b^4*(105*B*c^3 + 525*A*c^2*d - 525*c^2*C*d - 749
*B*c*d^2 - 311*A*d^3 + 221*C*d^3) + 2*a^2*b^6*(315*B*c^3 + 875*A*c^2*d - 875*c^2*C*d - 812*B*c*d^2 - 261*A*d^3
 + 291*C*d^3) + 2*a^5*b^3*d*(56*c*(A - C)*d + B*(35*c^2 - 12*d^2)) - b^8*(5*d*(49*A*c^2 - 49*c^2*C - 3*A*d^2)
+ 7*B*(15*c^3 - 23*c*d^2)) - 2*a^3*b^5*(210*c^3*C + 700*B*c^2*d - 798*c*C*d^2 - 317*B*d^3 - 42*A*(5*c^3 - 19*c
*d^2)))*Sqrt[c + d*Tan[e + f*x]])/(105*b^3*(a^2 + b^2)^4*(b*c - a*d)*f*Sqrt[a + b*Tan[e + f*x]]) - (2*(2*a^3*b
*B*d + 5*a^4*C*d + b^4*(7*B*c + 5*A*d) + 2*a*b^3*(7*A*c - 7*c*C - 6*B*d) - a^2*b^2*(7*B*c + 9*A*d - 19*C*d))*(
c + d*Tan[e + f*x])^(3/2))/(35*b^2*(a^2 + b^2)^2*f*(a + b*Tan[e + f*x])^(5/2)) - (2*(A*b^2 - a*(b*B - a*C))*(c
 + d*Tan[e + f*x])^(5/2))/(7*b*(a^2 + b^2)*f*(a + b*Tan[e + f*x])^(7/2))

Rule 3645

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*t
an[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[((A*d^2 + c*(c*C - B*d))*(a + b*T
an[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 + d^2)), x] - Dist[1/(d*(n + 1)*(c^2 + d^2)), I
nt[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c
*m + a*d*(n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b*(d*(B*c - A*d)*(m + n + 1
) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c -
a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]

Rule 3649

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*t
an[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[((A*b^2 - a*(b*B - a*C))*(a + b*T
an[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 + b^2)), x] + Dist[1/((m + 1)*(
b*c - a*d)*(a^2 + b^2)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(a*(b*c - a*d)*(m + 1)
 - b^2*d*(m + n + 2)) + (b*B - a*C)*(b*c*(m + 1) + a*d*(n + 1)) - (m + 1)*(b*c - a*d)*(A*b - a*B - b*C)*Tan[e
+ f*x] - d*(A*b^2 - a*(b*B - a*C))*(m + n + 2)*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C,
 n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, -1] &&  !(ILtQ[n, -1] && ( !I
ntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))

Rule 3616

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(A + I*B)/2, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(1 -
 I*Tan[e + f*x]), x], x] + Dist[(A - I*B)/2, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(1 + I*Tan[e +
f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[A^2
 + B^2, 0]

Rule 3615

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[A^2/f, Subst[Int[((a + b*x)^m*(c + d*x)^n)/(A - B*x), x], x, Tan[e
+ f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[A^2 +
 B^2, 0]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(c+d \tan (e+f x))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{9/2}} \, dx &=-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{2 \int \frac{(c+d \tan (e+f x))^{3/2} \left (\frac{1}{2} ((b B-a C) (7 b c-5 a d)+A b (7 a c+5 b d))-\frac{7}{2} b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)-\frac{1}{2} \left (2 A b^2-2 a b B-5 a^2 C-7 b^2 C\right ) d \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{7/2}} \, dx}{7 b \left (a^2+b^2\right )}\\ &=-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{4 \int \frac{\sqrt{c+d \tan (e+f x)} \left (\frac{1}{4} \left (b (5 a c+3 b d) ((b B-a C) (7 b c-5 a d)+A b (7 a c+5 b d))-(5 b c-3 a d) \left (2 a^2 b B d+5 a^3 C d+A b^2 (7 b c-9 a d)-7 b^3 (c C+B d)-7 a b^2 (B c-2 C d)\right )\right )+\frac{35}{4} b^2 \left (2 a b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \tan (e+f x)+\frac{1}{4} d \left (6 a^3 b B d+15 a^4 C d-2 a b^3 (14 A c-14 c C-17 B d)-b^4 (14 B c+5 (4 A-7 C) d)+2 a^2 b^2 (7 B c+4 A d+11 C d)\right ) \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^{5/2}} \, dx}{35 b^2 \left (a^2+b^2\right )^2}\\ &=-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{8 \int \frac{\frac{1}{8} \left (6 a^5 b B d^3+15 a^6 C d^3+a^4 b^2 d^2 (14 B c+8 A d+37 C d)-a b^5 \left (315 A c^3-315 c^3 C-735 B c^2 d-497 A c d^2+497 c C d^2+71 B d^3\right )-a^3 b^3 \left (105 c^3 C+245 B c^2 d-203 c C d^2-75 B d^3-7 A \left (15 c^3-29 c d^2\right )\right )-b^6 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )+3 a^2 b^4 \left (35 B \left (3 c^3-5 c d^2\right )+d \left (245 A c^2-245 c^2 C-39 A d^2+54 C d^2\right )\right )\right )-\frac{105}{8} b^3 \left (3 a^2 b \left (A c^3-c^3 C-3 B c^2 d-3 A c d^2+3 c C d^2+B d^3\right )+b^3 \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3-A \left (c^3-3 c d^2\right )\right )-a^3 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )+3 a b^2 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )\right ) \tan (e+f x)+\frac{1}{8} d \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)-3 a^2 b^4 \left (70 A c^2-70 c^2 C-140 B c d-66 A d^2+51 C d^2\right )+b^6 \left (70 A c^2-70 c^2 C-154 B c d-90 A d^2+105 C d^2\right )-2 a b^5 \left (224 c (A-C) d+B \left (105 c^2-122 d^2\right )\right )+2 a^3 b^3 \left (56 c (A-C) d+5 B \left (7 c^2-3 d^2\right )\right )\right ) \tan ^2(e+f x)}{(a+b \tan (e+f x))^{3/2} \sqrt{c+d \tan (e+f x)}} \, dx}{105 b^3 \left (a^2+b^2\right )^3}\\ &=-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (6 a^7 b B d^3+15 a^8 C d^3+2 a^6 b^2 d^2 (7 B c+4 A d+26 C d)-2 a b^7 \left (210 A c^3-210 c^3 C-525 B c^2 d-406 A c d^2+406 c C d^2+88 B d^3\right )-a^4 b^4 \left (105 B c^3+525 A c^2 d-525 c^2 C d-749 B c d^2-311 A d^3+221 C d^3\right )+2 a^2 b^6 \left (315 B c^3+875 A c^2 d-875 c^2 C d-812 B c d^2-261 A d^3+291 C d^3\right )+2 a^5 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right )-b^8 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )-2 a^3 b^5 \left (210 c^3 C+700 B c^2 d-798 c C d^2-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}-\frac{16 \int \frac{\frac{105}{16} b^3 (b c-a d) \left (6 a^2 b^2 \left (A c^3-c^3 C-3 B c^2 d-3 A c d^2+3 c C d^2+B d^3\right )+a^4 \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3-A \left (c^3-3 c d^2\right )\right )+b^4 \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3-A \left (c^3-3 c d^2\right )\right )-4 a^3 b \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )+4 a b^3 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )\right )+\frac{105}{16} b^3 (b c-a d) \left (4 a^3 b \left (A c^3-c^3 C-3 B c^2 d-3 A c d^2+3 c C d^2+B d^3\right )+4 a b^3 \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3-A \left (c^3-3 c d^2\right )\right )-a^4 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )+6 a^2 b^2 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )-b^4 \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )\right ) \tan (e+f x)}{\sqrt{a+b \tan (e+f x)} \sqrt{c+d \tan (e+f x)}} \, dx}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d)}\\ &=-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (6 a^7 b B d^3+15 a^8 C d^3+2 a^6 b^2 d^2 (7 B c+4 A d+26 C d)-2 a b^7 \left (210 A c^3-210 c^3 C-525 B c^2 d-406 A c d^2+406 c C d^2+88 B d^3\right )-a^4 b^4 \left (105 B c^3+525 A c^2 d-525 c^2 C d-749 B c d^2-311 A d^3+221 C d^3\right )+2 a^2 b^6 \left (315 B c^3+875 A c^2 d-875 c^2 C d-812 B c d^2-261 A d^3+291 C d^3\right )+2 a^5 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right )-b^8 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )-2 a^3 b^5 \left (210 c^3 C+700 B c^2 d-798 c C d^2-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{\left ((A-i B-C) (c-i d)^3\right ) \int \frac{1+i \tan (e+f x)}{\sqrt{a+b \tan (e+f x)} \sqrt{c+d \tan (e+f x)}} \, dx}{2 (a-i b)^4}+\frac{\left ((A+i B-C) (c+i d)^3\right ) \int \frac{1-i \tan (e+f x)}{\sqrt{a+b \tan (e+f x)} \sqrt{c+d \tan (e+f x)}} \, dx}{2 (a+i b)^4}\\ &=-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (6 a^7 b B d^3+15 a^8 C d^3+2 a^6 b^2 d^2 (7 B c+4 A d+26 C d)-2 a b^7 \left (210 A c^3-210 c^3 C-525 B c^2 d-406 A c d^2+406 c C d^2+88 B d^3\right )-a^4 b^4 \left (105 B c^3+525 A c^2 d-525 c^2 C d-749 B c d^2-311 A d^3+221 C d^3\right )+2 a^2 b^6 \left (315 B c^3+875 A c^2 d-875 c^2 C d-812 B c d^2-261 A d^3+291 C d^3\right )+2 a^5 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right )-b^8 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )-2 a^3 b^5 \left (210 c^3 C+700 B c^2 d-798 c C d^2-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{\left ((A-i B-C) (c-i d)^3\right ) \operatorname{Subst}\left (\int \frac{1}{(1-i x) \sqrt{a+b x} \sqrt{c+d x}} \, dx,x,\tan (e+f x)\right )}{2 (a-i b)^4 f}+\frac{\left ((A+i B-C) (c+i d)^3\right ) \operatorname{Subst}\left (\int \frac{1}{(1+i x) \sqrt{a+b x} \sqrt{c+d x}} \, dx,x,\tan (e+f x)\right )}{2 (a+i b)^4 f}\\ &=-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (6 a^7 b B d^3+15 a^8 C d^3+2 a^6 b^2 d^2 (7 B c+4 A d+26 C d)-2 a b^7 \left (210 A c^3-210 c^3 C-525 B c^2 d-406 A c d^2+406 c C d^2+88 B d^3\right )-a^4 b^4 \left (105 B c^3+525 A c^2 d-525 c^2 C d-749 B c d^2-311 A d^3+221 C d^3\right )+2 a^2 b^6 \left (315 B c^3+875 A c^2 d-875 c^2 C d-812 B c d^2-261 A d^3+291 C d^3\right )+2 a^5 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right )-b^8 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )-2 a^3 b^5 \left (210 c^3 C+700 B c^2 d-798 c C d^2-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}+\frac{\left ((A-i B-C) (c-i d)^3\right ) \operatorname{Subst}\left (\int \frac{1}{i a+b-(i c+d) x^2} \, dx,x,\frac{\sqrt{a+b \tan (e+f x)}}{\sqrt{c+d \tan (e+f x)}}\right )}{(a-i b)^4 f}+\frac{\left ((A+i B-C) (c+i d)^3\right ) \operatorname{Subst}\left (\int \frac{1}{-i a+b-(-i c+d) x^2} \, dx,x,\frac{\sqrt{a+b \tan (e+f x)}}{\sqrt{c+d \tan (e+f x)}}\right )}{(a+i b)^4 f}\\ &=-\frac{(i A+B-i C) (c-i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c-i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a-i b} \sqrt{c+d \tan (e+f x)}}\right )}{(a-i b)^{9/2} f}-\frac{(B-i (A-C)) (c+i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+i d} \sqrt{a+b \tan (e+f x)}}{\sqrt{a+i b} \sqrt{c+d \tan (e+f x)}}\right )}{(a+i b)^{9/2} f}-\frac{2 \left (6 a^5 b B d^2+15 a^6 C d^2+a^4 b^2 d (14 B c+8 A d+37 C d)+3 a^2 b^4 \left (35 A c^2-35 c^2 C-70 B c d-39 A d^2+54 C d^2\right )-a^3 b^3 \left (98 c (A-C) d+B \left (35 c^2-75 d^2\right )\right )+a b^5 \left (182 c (A-C) d+B \left (105 c^2-71 d^2\right )\right )+b^6 \left (7 c (5 c C+8 B d)-5 A \left (7 c^2-3 d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^3 f (a+b \tan (e+f x))^{3/2}}-\frac{2 \left (6 a^7 b B d^3+15 a^8 C d^3+2 a^6 b^2 d^2 (7 B c+4 A d+26 C d)-2 a b^7 \left (210 A c^3-210 c^3 C-525 B c^2 d-406 A c d^2+406 c C d^2+88 B d^3\right )-a^4 b^4 \left (105 B c^3+525 A c^2 d-525 c^2 C d-749 B c d^2-311 A d^3+221 C d^3\right )+2 a^2 b^6 \left (315 B c^3+875 A c^2 d-875 c^2 C d-812 B c d^2-261 A d^3+291 C d^3\right )+2 a^5 b^3 d \left (56 c (A-C) d+B \left (35 c^2-12 d^2\right )\right )-b^8 \left (5 d \left (49 A c^2-49 c^2 C-3 A d^2\right )+7 B \left (15 c^3-23 c d^2\right )\right )-2 a^3 b^5 \left (210 c^3 C+700 B c^2 d-798 c C d^2-317 B d^3-42 A \left (5 c^3-19 c d^2\right )\right )\right ) \sqrt{c+d \tan (e+f x)}}{105 b^3 \left (a^2+b^2\right )^4 (b c-a d) f \sqrt{a+b \tan (e+f x)}}-\frac{2 \left (2 a^3 b B d+5 a^4 C d+b^4 (7 B c+5 A d)+2 a b^3 (7 A c-7 c C-6 B d)-a^2 b^2 (7 B c+9 A d-19 C d)\right ) (c+d \tan (e+f x))^{3/2}}{35 b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))^{5/2}}-\frac{2 \left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^{5/2}}{7 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^{7/2}}\\ \end{align*}

Mathematica [C]  time = 52.8871, size = 2719441, normalized size = 2874.67 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[((c + d*Tan[e + f*x])^(5/2)*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(a + b*Tan[e + f*x])^(9/2),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [F]  time = 180., size = 0, normalized size = 0. \begin{align*} \int{(A+B\tan \left ( fx+e \right ) +C \left ( \tan \left ( fx+e \right ) \right ) ^{2}) \left ( c+d\tan \left ( fx+e \right ) \right ) ^{{\frac{5}{2}}} \left ( a+b\tan \left ( fx+e \right ) \right ) ^{-{\frac{9}{2}}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^(9/2),x)

[Out]

int((c+d*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^(9/2),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^(9/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^(9/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))**(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*tan(f*x+e))**(9/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^(9/2),x, algorithm="giac")

[Out]

Exception raised: TypeError